Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Reading Input Data

These functions are used by format-specific graphics exporters when transcoding. Applications will not normally need to call these functions.


GraphicsExportMayExporterReadInputData

Asks whether the image source is in a form that can be read.

pascal ComponentResult GraphicsExportMayExporterReadInputData ( GraphicsExportComponent ci,
                                         Boolean *mayReadInputData);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
mayReadInputData
Points to a Boolean to receive the answer.

DISCUSSION

Some kinds of image source, such as files and handles, form a stream of bytes that can be read directly. Others, such as pictures and pixmaps, cannot. Format-specific graphics exporters usually cannot transcode if they cannot read the original data, so those exporters which implement CanTranscode will usually call GraphicsExportMayExporterReadInputData .


GraphicsExportGetInputDataSize

Returns the number of bytes of original image data that can be read.

pascal ComponentResult GraphicsExportGetInputDataSize (GraphicsExportComponent ci,
                                         unsigned long *size);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
size
Points to a variable to receive the size in bytes.

RESULT CODES

paramErr -50 Invalid parameter, or the source image doesn't permit this operation.

GraphicsExportReadInputData

Reads original image data.

pascal ComponentResult GraphicsExportReadInputData (GraphicsExportComponent ci,
                                         void *dataPtr,
                                         unsigned long dataOffset,
                                         unsigned long dataSize);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
dataPtr
A pointer to a memory block to receive the data.
dataOffset
The offset of the image data within the source image data. The function begins reading image data from this offset.
dataSize
The number of bytes of image data to read.

DISCUSSION

GraphicsExportReadInputData communicates with the appropriate data handler to retrieve image data.

RESULT CODES

noErr 0 No error
paramErr -50 Invalid parameter specified
memFullErr -108 Not enough memory available

© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |